package com.xxx.config;


import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
public class UploadConfig implements WebMvcConfigurer {
    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        //设置请求路径和文件物理路径的关系映射
        registry.addResourceHandler("/upfile/**").addResourceLocations("file:D:/资料/壁纸/");
    }
}
